package com.junjie.checkin.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.junjie.checkin.entity.Enum.PointRecordTypeEnum;
import lombok.Data;
import java.io.Serializable;

/**
 * 用户积分明细表(TPointRecord)实体类
 *
 * @author makejava
 * @since 2025-06-14 13:42:04
 */
@Data
@TableName("t_point_record")
public class TPointRecord implements Serializable {
    private static final long serialVersionUID = 676764062861937690L;
    
/**
     * 主键ID
     */    
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    
/**
     * 用户ID
     */    
    @TableField(value = "user_id")
    private Integer userId;
    
/**
     * 相关记录ID，如活动ID、礼物兑换ID等
     */    
    @TableField(value = "related_id")
    private Integer relatedId;
    
/**
     * 积分变动类型,包括活动,礼物和人工修改 TODO 这里该换成枚举
     */    
    @TableField(value = "related_type")
    private PointRecordTypeEnum relatedType;
    
/**
     * 本次积分变化值，正数表示增加，负数表示减少
     */    
    @TableField(value = "change_point")
    private Integer changePoint;
    
/**
     * 该用户当前总积分
     */    
    @TableField(value = "total_point")
    private Integer totalPoint;
    
/**
     * 备注，说明积分变动原因
     */    
    @TableField(value = "remark")
    private String remark;
    
    
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    
    
    @TableField(value = "create_by")
    private String createBy;
    
}
